package com.levi.dubbo.controller;

import com.alibaba.dubbo.config.annotation.Reference;
import com.levi.service.IUserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserController {
    @Reference //dubbo的注解
    private IUserService userService;

    @GetMapping("/hello")
    public String hello(String name) {
        return userService.hello(name);
    }
}
